package com.ladlee.validata.image;

import com.ladlee.validata.ValidateCode;
import lombok.Data;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * @Auther: dingchang
 * @Date: 2018/12/21 14:30
 * @Description: 图形验证码类
 */
@Data
public class ImageCode extends ValidateCode {

    private static final long serialVersionUID = -1907182070224995792L;

    private BufferedImage image;//用于储存图像验证码

    public ImageCode(String code, int expireIn, BufferedImage image) {
        super(code, expireIn);//传入**秒过期
        this.image = image;
    }

    public ImageCode(String code, LocalDateTime expireTime, BufferedImage image) {
        super(code, expireTime);//直接传入过期时间
        this.image = image;
    }
}
